package com.zsx.shopping.order.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 订单
 * @TableName oms_order
 */
@TableName(value ="oms_order")
@Data
public class Order implements Serializable {
    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 订单号
     */
    private String orderSn;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 收货人姓名
     */
    private String receiverName;

    /**
     * 收货人电话
     */
    private String receiverPhone;

    /**
     * 省份/直辖市
     */
    private String receiverProvince;

    /**
     * 城市
     */
    private String receiverCity;

    /**
     * 区域
     */
    private String receiverRegion;

    /**
     * 详细地址(街道)
     */
    private String receiverDetailAddress;

    /**
     * 应付总额
     */
    private BigDecimal payAmount;

    /**
     * 订单状态(1:待付款 2:待发货 3:待确认 4:待评价 5:已完成 6:已取消 7:已关闭)
     */
    private Byte status;

    /**
     * 是否被删除
     */
    private Boolean deleteState;

    /**
     * 支付时间
     */
    private LocalDateTime paymentTime;

    /**
     * 确认收货时间
     */
    private LocalDateTime receiveTime;

    /**
     * 送货方式(1:普通快递送货上门 2:特快专递 3:加急快递送货上门 4:平邮)
     */
    private Byte deliveryType;

    /**
     * 支付方式(1:货到付款 2:在线支付 3:上门自提 4:邮局汇款)
     */
    private Byte paymentType;

    /**
     * 运费
     */
    private BigDecimal fare;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}